package xyz.xiaomuyu.moment_read_app.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import xyz.xiaomuyu.moment_read_app.R;
import xyz.xiaomuyu.moment_read_app.bean.woshishabi;
import xyz.xiaomuyu.moment_read_app.yuedu.yuedu1;

public class CollectionForRead extends Activity {

    View view;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_collection_for_read);
        view = findViewById(R.id.collection_read);
        if(woshishabi.collection_read == 1){

            view.setVisibility(View.VISIBLE);
            view.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    Intent intent = new Intent(CollectionForRead.this, yuedu1.class);
                    startActivity(intent);
                }
            });
        }else {
            view.setVisibility(View.INVISIBLE);
        }
    }
}